<?php

$firstname = $_REQUEST['firstname'] ;
$lastname = $_REQUEST['lastname'] ;
$email = $_REQUEST['email'] ;
$city = $_REQUEST['city'] ;
$state = $_REQUEST['state'] ;
$zip = $_REQUEST['zip'] ;


//add you email below to have form submitted to you
$send_email = "email@example.com";

  mail( $send_email, "subPage Registration", "Firstname: $firstname\nLastname: $lastname\nEmail: $email\nCity: $city\nState: $state\nZip: $zip", "From: $email" );
  setcookie("email", $email, time()+3600);
  
  header( "Location: /submit" );

?>
